-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document the process anti pattern of sending large data #13194
Document the process anti pattern of sending large data #13194
Conversation
Follow up to/extension of elixir-lang#13173 First draft, happy to adjust and extend it in many ways. I had trouble coming up with a simple example as we needed a bunch of data to make sure it's not good. I could have employed the first anti pattern myself and did repeated statistics calculation, but that'd have been worse :sweat-smile: I remembered José's comment around sending along the `conn` and figured it's central enough in elixir to not throw anyone off. If someone has a better example, happy to redo it! Thanks y'all! :green-heart:
5806d5a
to
1e22915
Compare
The original anti-patterns mentioned exactly this, sending data between processes, but it was removed because it is hard to precisely say when you are sending large data. Sometimes you do have to send it and there isn't much we can do. Therefore, can you please rephrase this as accidentally capturing large data on spawn? I.e. without the sending considerations? Thank you. |
@josevalim 👋 Thanks for the context, I was unaware of the previous version. Rephrasing to validate my understanding:
Happy to do that! Question though, shouldn't we at least mention |
Hrm. It is fine to mention |
Makes sense, thanks for the clarification! I'll get back to it later today! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor capitalization/wording suggestions. Regardless, I love this content!
Excellent suggestions and improvements on wording from @Netzteb! Co-authored-by: Noah Betzen <noah@nezteb.net>
@Nezteb thanks for taking the time to review & make suggestions! |
And @whatyouhide also came in with a round of improvements, thank you! Co-authored-by: Andrea Leopardi <an.leopardi@gmail.com>
And a big thank you to @whatyouhide ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. I suggest also adding an example (either here or on GenServer docs) about doing this when sending messages. While it's way more obvious, it also happens :)
💚 💙 💜 💛 ❤️ |
Follow up to/extension of #13173
@josevalim thanks for the merge and as I don't think I'll open another issue/MR that soon: Happy holidays! 💚 |
As per usual, thanks to all of ya for your great work!
Follow up to/extension of #13173
First draft, happy to adjust and extend it in many ways. I had trouble coming up with a simple example as we needed a bunch of data to make sure it's not good. I could have employed the first anti pattern myself and did repeated statistics calculation, but that'd have been worse :sweat-smile:
I remembered José's comment around sending along the
conn
and figured it's central enough in elixir to not throw anyone off.If someone has a better example, happy to redo it!
Thanks y'all! :green-heart: